import Vue from 'vue';
import Router from 'vue-router';
import Goods from '@/page/goods';
import Content from '@/page/content';
import Order from '@/page/order';
import OrderPrint from '@/page/orderPrint';
import Certain from '@/page/certain';
import User from '@/page/user';
import Bill from '@/page/bill';
import Login from '@/page/login';
import Index from '@/page/index';

import Vuex from 'vuex'

Vue.use(Router);
Vue.use(Vuex);

export default new Router({
  routes: [{
    path: '/',
    component: Login,
    name: 'login'
  }, 
  {
    path:'/orderPrint/:id',
    component:OrderPrint,
    name:'OrderPrint'
  },
  {
    path: '/index',
    component: Index,
    name: 'index',
    children :[
      {
        path:'/goods',
        component:Goods,
        name :"Goods"
      },
      {
        path:'/content',
        component:Content,
        name :"Content"
      },
      {
          path:'/order',
          component:Order,
          name:'Order'
      },
      {
        path:'/certain',
        component:Certain,
        name:'Certain'
      },
      {
        path:'/user',
        component:User,
        name:'User'
      },
      {
        path:'/bill',
        component:Bill,
        name:'Bill'
      },
    ]
  }]
})
